From: kaf24@freefall.cl.cam.ac.uk Date: Mon, 27 Sep 2004 16:27:49 +0000 (+0000) Subject: bitkeeper revision 1.1159.1.189 (41583f85F6e-ZiwZL5lxbc3U6KIkeQ) X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~17400^2~562 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=08d79558c801b0071479e651c54387cf363cc52f;p=xen.git bitkeeper revision 1.1159.1.189 (41583f85F6e-ZiwZL5lxbc3U6KIkeQ) DOM0 never picks up wallclock time from Xen after initial boot. --- diff --git a/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c b/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c index 924a4a8efe..9257befe87 100644 --- a/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c +++ b/linux-2.4.27-xen-sparse/arch/xen/kernel/time.c @@ -127,7 +127,8 @@ static int __init __independent_wallclock(char *str) return 1; } __setup("independent_wallclock", __independent_wallclock); - +#define INDEPENDENT_WALLCLOCK() \ + (independent_wallclock || (start_info.flags & SIF_INITDOMAIN)) #ifdef CONFIG_XEN_PRIVILEGED_GUEST /* @@ -302,7 +303,7 @@ void do_settimeofday(struct timeval *tv) struct timeval newtv; suseconds_t usec; - if ( !independent_wallclock && !(start_info.flags & SIF_INITDOMAIN) ) + if ( !INDEPENDENT_WALLCLOCK() ) return; write_lock_irq(&xtime_lock); @@ -424,7 +425,7 @@ static inline void do_timer_interrupt(int irq, void *dev_id, * synchronised ourselves, and we haven't chosen to keep an independent * time base. */ - if ( !independent_wallclock && + if ( !INDEPENDENT_WALLCLOCK() && ((time_status & STA_UNSYNC) != 0) && (xtime.tv_sec > (last_update_from_xen + 60)) ) { diff --git a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c b/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c index 10562570a8..83b496d338 100644 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c +++ b/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/time.c @@ -146,6 +146,8 @@ static int __init __independent_wallclock(char *str) return 1; } __setup("independent_wallclock", __independent_wallclock); +#define INDEPENDENT_WALLCLOCK() \ + (independent_wallclock || (start_info.flags & SIF_INITDOMAIN)) /* * Reads a consistent set of time-base values from Xen, into a shadow data @@ -260,7 +262,7 @@ int do_settimeofday(struct timespec *tv) if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC) return -EINVAL; - if (!independent_wallclock && !(start_info.flags & SIF_INITDOMAIN)) + if (!INDEPENDENT_WALLCLOCK()) return 0; /* Silent failure? */ write_seqlock_irq(&xtime_lock); @@ -392,7 +394,7 @@ static inline void do_timer_interrupt(int irq, void *dev_id, * synchronised ourselves, and we haven't chosen to keep an independent * time base. */ - if (!independent_wallclock && + if (!INDEPENDENT_WALLCLOCK() && ((time_status & STA_UNSYNC) != 0) && (xtime.tv_sec > (last_update_from_xen + 60))) { /* Adjust shadow for jiffies that haven't updated xtime yet. */